//
//  MyCLController.h
//  Aeropuertos
//
//  Created by sid on 01/04/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//
// This protocol is used to send the text for location updates back to another view controller

#import <CoreLocation/CoreLocation.h>

@protocol LocateMeControllerDelegate <NSObject>
@required
-(void)newLocationUpdate:(CLLocation *)location;
-(void)newLocationError:(NSString *)text;
@end


// Class definition
@interface LocateMeController : NSObject <CLLocationManagerDelegate>
{
	CLLocationManager *locationManager;
	id delegate;
	BOOL updating;
}

@property (nonatomic, retain) CLLocationManager *locationManager;
@property (nonatomic,assign) id <LocateMeControllerDelegate> delegate;
@property BOOL updating;

- (void)startUpdatingLocation;
- (void)stopUpdatingLocation;
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation;
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error;

+ (LocateMeController *)sharedInstance;

@end